<template>
    <div class="person">
        <p>当前求和为：{{ sum }}</p>
        <button @click="add">点我sum+1</button>
        <PageDome28></PageDome28>
    </div>
</template>


<script setup lang="ts" name="Page28">
import { ref,onBeforeMount ,onMounted ,onBeforeUpdate,onUpdated,onBeforeUnmount,onUnmounted} from 'vue';
import PageDome28 from "./page/PageDome28.vue"

let sum = ref(0);
function add() {
    sum.value += 1
}
// 
// 创建
console.log('创建')
// 挂载前
onBeforeMount(() => {
    console.log('挂载前')
});
// 挂载
onMounted(()=>{
    console.log('挂载')
});
// 更新前
onBeforeUpdate(() => {
    console.log('更新前')
});
// 更新
onUpdated(()=>{
    console.log('更新')
});

// 卸载前
onBeforeUnmount(() => {
    console.log('卸载前')
});
// 卸载
onUnmounted(()=>{
    console.log('卸载')
});



</script>

<style lang="scss" scoped></style>